package cn.jiakeyun.umeng_vertify

import android.content.Context
import androidx.annotation.NonNull
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel

abstract class BaseManager {
    abstract fun checkMethod(
        @NonNull call: MethodCall,
        @NonNull result: MethodChannel.Result,
        @NonNull context: Context
    ): Boolean

    fun <T> getMethodParam(call: MethodCall, paramName: String, initialData: T): T {
        return call.argument<T>(paramName) ?: initialData
    }
}